package com.liqing.movecomment.entity;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * (Actor)实体类
 *
 * @author makejava
 * @since 2023-05-08 02:01:54
 */
public class Actor implements Serializable {
    private static final long serialVersionUID = -38195126872489771L;
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 演员名
     */
    private String name;
    /**
     * 演员头像
     */
    private String avatar;
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public Integer getId() {
        return this.id;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="delombok">
    /**
     * 演员名
     */
    @SuppressWarnings("all")
    public String getName() {
        return this.name;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="delombok">
    /**
     * 演员头像
     */
    @SuppressWarnings("all")
    public String getAvatar() {
        return this.avatar;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public LocalDateTime getCreateTime() {
        return this.createTime;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public void setId(final Integer id) {
        this.id = id;
    }
    //</editor-fold>

    /**
     * 演员名
     */
    @SuppressWarnings("all")
    public void setName(final String name) {
        this.name = name;
    }

    //<editor-fold defaultstate="collapsed" desc="delombok">
    /**
     * 演员头像
     */
    @SuppressWarnings("all")
    public void setAvatar(final String avatar) {
        this.avatar = avatar;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @SuppressWarnings("all")
    public void setCreateTime(final LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Actor)) return false;
        final Actor other = (Actor) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
        final Object this$avatar = this.getAvatar();
        final Object other$avatar = other.getAvatar();
        if (this$avatar == null ? other$avatar != null : !this$avatar.equals(other$avatar)) return false;
        final Object this$createTime = this.getCreateTime();
        final Object other$createTime = other.getCreateTime();
        if (this$createTime == null ? other$createTime != null : !this$createTime.equals(other$createTime)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof Actor;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $name = this.getName();
        result = result * PRIME + ($name == null ? 43 : $name.hashCode());
        final Object $avatar = this.getAvatar();
        result = result * PRIME + ($avatar == null ? 43 : $avatar.hashCode());
        final Object $createTime = this.getCreateTime();
        result = result * PRIME + ($createTime == null ? 43 : $createTime.hashCode());
        return result;
    }

    @Override
    @SuppressWarnings("all")
    public String toString() {
        return "Actor(id=" + this.getId() + ", name=" + this.getName() + ", avatar=" + this.getAvatar() + ", createTime=" + this.getCreateTime() + ")";
    }

    @SuppressWarnings("all")
    public Actor(final Integer id, final String name, final String avatar, final LocalDateTime createTime) {
        this.id = id;
        this.name = name;
        this.avatar = avatar;
        this.createTime = createTime;
    }

    @SuppressWarnings("all")
    public Actor() {
    }
}
    //</editor-fold>
